﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditTechnologyConsultingControl.aspx.cs" Inherits="Portal.Web.Admin.Article.EditTechnologyConsultingControl" %>

<form id="edit-technologyconsulting-form" action="EditSave.aspx" method="POST"
    enctype="multipart/form-data">
    <input type="hidden" name="Id" value="<%=Model.Id %>" />
    <input type="hidden" name="CategoryId" value="<%=Model.CategoryId %>" />
    <fieldset>
        <legend></legend>
        <p>
            <label>
                文章标题:</label><input type="text" name="MainTitle" style="width: 400px" class="easyui-validatebox"
                    required="true" value="" />
        </p>
        <p>
            <label>
                文章副标题:</label><input type="text" name="SubTitle" style="width: 400px" class="easyui-validatebox"
                    required="true" value="" />
        </p>
        <p style="display: none">
            <label>
                是否推荐:</label>

            <input type="checkbox" name="IsRecommend" value="<%=Model.IsRecommend %>" />
        </p>
        <p>
            <label>
                语言:</label><select id="edit-technologyconsulting-culture" name="Culture" editable="false">
                </select>
        </p>
        <p>
            <label>
                发布时间:</label><input type="text" style="width: 200px" id="edit-technologyconsulting-createtime"
                    name="CreateTime" value="<%=Model.CreateTime.ToString("yyyy-MM-dd HH:mm:ss") %>" />
        </p>
        <p>
            <label>
                文章内容:</label>
            <span class="span-textarea">
                <textarea name="Content" id="edit-technologyconsulting-content" style="width: 700px; height: 400px;"><%=Model.Content %></textarea>
            </span>
        </p>
        <p>
            <label>
                &nbsp;</label>
            <input type="button" id="btn-edit-technologyconsulting-submit" value="保存" />
            <input type="reset" value="重置" />
        </p>
    </fieldset>
</form>
<script type="text/javascript">
    var edittechnologyconsultingcreatetimeeditor;
    window.KindEditor.create('#edit-technologyconsulting-content', {
        cssPath: '/Content/Common/Widget/kindeditor/plugins/code/prettify.css',
        uploadJson: '',
        fileManagerJson: '',
        allowFileManager: true,
        afterCreate: function () {
            edittechnologyconsultingcreatetimeeditor = this;

        }
    });
    $('#edit-technologyconsulting-edittime').datetimebox({
        showSeconds: false
    });
    $('#edit-technologyconsulting-culture').combobox({
        data: CultureComboboxJsonData,
        valueField: 'id',
        textField: 'text'
    });
    $('#edit-technologyconsulting-culture').combobox("setValue", $("#edit-technologyconsulting-culture").attr('culturevalue'));
    $('#btn-edit-technologyconsulting-submit').click(function () {
        self.sync();
        $.ajax({
            type: "POST",
            url: "article/editsave",
            data: $("#edit-technologyconsulting-form").serialize(),
            success: function (msg) {
                AjaxMessage(msg);
                if (msg.state)
                    if (table != undefined)
                        try {
                            table.datagrid("reload");
                        } catch (e) {

                        }

            },
            error: function () {
                $.messager.alert('错误', '修改失败！', "error");
            }
        });
    });
</script>
